﻿using LiveCharts;
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace CustomWPFControl.ViewModel
{
    public class DataLabelConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var point = value as ChartPoint;
            return point.Y == -100 || point.X.ToString().Contains(".") ? Visibility.Collapsed : Visibility.Visible;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
